package cc.rengu.igas.bomp.common.enums;

import org.springframework.util.StringUtils;

/**
 * 支付宝特殊费率申请图片枚举类（与内管平台保持一致）
 */
public enum AlpayActivityImageEnum {
    businessLicenseImage("00", "businessLicenseImage", "营业执照"),
    certFaceImage("01", "certFaceImage", "法人身份证人像面图片"),
    certBackImage("02", "certBackImage", "法人身份证国徽面图片"),
    settledImage("06", "settledImage", "主流餐饮平台入驻证明图"),
    institutionalOrganizationImage("07", "institutionalOrganizationImage", "事业单位法人证书图片"),
    runSchoolLicenseImage("08", "runSchoolLicenseImage", "办学资质图片"),
    artifRegistrationImage("09", "artifRegistrationImage", "法人登记证书图片"),
    medicalInstrumentPracticeLicenseImage("0A", "medicalInstrumentPracticeLicenseImage", "医疗执业许可证图片"),
    chargeSampleImage("0B", "chargeSampleImage", "收费样本"),
    diplomaticNoteImage("0C", "diplomaticNoteImage", "照会"),
    privateNonenterpriseUnitsImage("0D", "privateNonenterpriseUnitsImage", "民办非企业单位登记证书图片"),
    shopEntranceImage("10", "shopEntranceImage", "门头照"),
    indoorImage("11", "indoorImage", "店内环境照"),
    checkstandImage("40", "checkstandImage", "收银台照片"),
    certificateFileImage("99", "certificateFileImage", "证明文件图片");

    private String imageType;
    private String name;
    private String title;

    public String getImageType() {
        return imageType;
    }

    public void setImageType(String imageType) {
        this.imageType = imageType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    AlpayActivityImageEnum(String imageType, String name, String title) {
        this.imageType = imageType;
        this.name = name;
        this.title = title;
    }

    public static AlpayActivityImageEnum getImageTypeEnumByImageType(String imageType) {
        if (StringUtils.isEmpty(imageType)) {
            return null;
        }

        for (AlpayActivityImageEnum alpayActivityImageEnum : AlpayActivityImageEnum.values()) {
            if (alpayActivityImageEnum.getImageType().equals(imageType)) {
                return alpayActivityImageEnum;
            }
        }
        return null;
    }
}
